<?php

use Illuminate\Database\Seeder;

class PermissionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        \App\Models\Auth\Permission::query()->insert([
            ['permission_id' => 1, 'name' => 'PermissionSeeder', 'title' => '权限管理', 'pid' => 0],
            ['permission_id' => 2, 'name' => 'permission_index', 'title' => '权限列表', 'pid' => 1],
            ['permission_id' => 3, 'name' => 'permission_show', 'title' => '权限详情', 'pid' => 1],
            ['permission_id' => 4, 'name' => 'permission_store', 'title' => '权限添加', 'pid' => 1],
            ['permission_id' => 5, 'name' => 'permission_save', 'title' => '权限修改', 'pid' => 1],
            ['permission_id' => 12, 'name' => 'permission_del', 'title' => '权限删除', 'pid' => 1],

            ['permission_id' => 6, 'name' => 'role', 'title' => '角色管理', 'pid' => 0],
            ['permission_id' => 7, 'name' => 'role_index', 'title' => '角色列表', 'pid' => 6],
            ['permission_id' => 8, 'name' => 'role_show', 'title' => '角色详情', 'pid' => 6],
            ['permission_id' => 9, 'name' => 'role_store', 'title' => '角色添加', 'pid' => 6],
            ['permission_id' => 10, 'name' => 'role_save', 'title' => '角色编辑', 'pid' => 6],
            ['permission_id' => 11, 'name' => 'role_del', 'title' => '角色删除', 'pid' => 6],

            ['permission_id' => 13, 'name' => 'admin', 'title' => '管理员管理', 'pid' => 0],
            ['permission_id' => 14, 'name' => 'admin_index', 'title' => '管理员列表', 'pid' => 13],
            ['permission_id' => 15, 'name' => 'admin_show', 'title' => '管理员详情', 'pid' => 13],
            ['permission_id' => 16, 'name' => 'admin_store', 'title' => '管理员添加', 'pid' => 13],
            ['permission_id' => 17, 'name' => 'admin_save', 'title' => '管理员编辑', 'pid' => 13],
            ['permission_id' => 18, 'name' => 'admin_del', 'title' => '管理员删除', 'pid' => 13],
            ['permission_id' => 19, 'name' => 'admin_info', 'title' => '管理员信息', 'pid' => 13],

        ]);
    }
}
